<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ArcGIS Online 空间数据库模式可视化</title>
    <!-- Material Design Lite CSS -->
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
    <link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.indigo-pink.min.css">
    <script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>
    <style>
        body {
            font-family: 'Roboto', 'Helvetica', sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f5f5f5;
        }
        .page-content {
            padding: 24px;
            max-width: 1200px;
            margin: 0 auto;
        }
        .mdl-card {
            width: 100%;
            min-height: auto;
            margin-bottom: 24px;
        }
        .mdl-card__title {
            background-color: #3f51b5;
            color: #fff;
            height: 64px;
        }
        .table-card {
            margin-bottom: 32px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }
        .table-header {
            background-color: #3f51b5;
            color: white;
            padding: 16px;
            border-radius: 4px 4px 0 0;
        }
        .table-content {
            padding: 16px;
            background-color: white;
        }
        .column-row {
            display: flex;
            border-bottom: 1px solid #e0e0e0;
            padding: 8px 0;
        }
        .column-row:last-child {
            border-bottom: none;
        }
        .column-name {
            flex: 2;
            font-weight: 500;
        }
        .column-type {
            flex: 2;
            color: #666;
        }
        .column-constraints {
            flex: 3;
            color: #666;
        }
        .primary-key {
            color: #ff4081;
            font-weight: 500;
        }
        .foreign-key {
            color: #2196F3;
            font-weight: 500;
        }
        .geometry-field {
            color: #4CAF50;
            font-weight: 500;
        }
        .relationship-diagram {
            margin-top: 40px;
            padding: 20px;
            background-color: white;
            border-radius: 4px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }
        .relationship-title {
            margin-bottom: 20px;
            color: #3f51b5;
        }
        .relationship-container {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-around;
        }
        .relationship-item {
            margin: 10px;
            padding: 15px;
            background-color: #e8eaf6;
            border-radius: 4px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            max-width: 300px;
        }
        .relationship-arrow {
            font-size: 24px;
            margin: 0 10px;
            color: #3f51b5;
        }
        .table-description {
            margin-top: 8px;
            color: #666;
            font-style: italic;
        }
        /* 为表头中的描述文字添加更好的可见性 */
        .table-header .table-description {
            color: rgba(255, 255, 255, 0.9);
            font-weight: 500;
            font-style: normal;
            margin-top: 8px;
            line-height: 1.4;
        }
        .mdl-tabs__tab-bar {
            justify-content: flex-start;
        }
        .mdl-tabs__tab {
            flex-grow: 0;
        }
        .schema-overview {
            margin-bottom: 32px;
        }
        .schema-info {
            background-color: white;
            padding: 16px;
            border-radius: 4px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        .feature-type-icon {
            display: inline-block;
            width: 24px;
            height: 24px;
            margin-right: 8px;
            vertical-align: middle;
            background-size: contain;
            background-repeat: no-repeat;
        }
        .point-icon {
            background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%234CAF50"><circle cx="12" cy="12" r="8"/></svg>');
        }
        .line-icon {
            background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke="%232196F3" stroke-width="4"><line x1="3" y1="21" x2="21" y2="3"/></svg>');
        }
        .polygon-icon {
            background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23FF4081"><polygon points="12,2 22,12 12,22 2,12"/></svg>');
        }
    </style>
</head>
<body>
    <div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
        <header class="mdl-layout__header">
            <div class="mdl-layout__header-row">
                <span class="mdl-layout-title">ArcGIS Online 空间数据库模式可视化</span>
                <div class="mdl-layout-spacer"></div>
                <nav class="mdl-navigation mdl-layout--large-screen-only">
                    <a class="mdl-navigation__link" href="#overview">概览</a>
                    <a class="mdl-navigation__link" href="#tables">空间表</a>
                    <a class="mdl-navigation__link" href="#relationships">关系</a>
                </nav>
            </div>
        </header>
        <div class="mdl-layout__drawer">
            <span class="mdl-layout-title">导航</span>
            <nav class="mdl-navigation">
                <a class="mdl-navigation__link" href="#overview">概览</a>
                <a class="mdl-navigation__link" href="#tables">空间表</a>
                <a class="mdl-navigation__link" href="#relationships">关系</a>
            </nav>
        </div>
        <main class="mdl-layout__content">
            <div class="page-content">
                <section id="overview" class="schema-overview">
                    <h4>空间数据库概览</h4>
                    <div class="schema-info">
                        <p><strong>数据库名称:</strong> ArcGIS Online FeatureLayer</p>
                        <p><strong>数据库类型:</strong> ArcGIS Online 云空间数据库</p>
                        <p><strong>描述:</strong> 该数据库存储城市设计系统中的空间要素，包括点、线、面三种几何类型的要素。</p>
                        <p><strong>服务URL:</strong> https://services8.arcgis.com/CmXfu09loK81if9H/arcgis/rest/services/DeepseekDesignCityFeaturelayer/FeatureServer</p>
                        <p><strong>表总数:</strong> 3</p>
                    </div>
                </section>

                <section id="tables">
                    <h4>空间数据表</h4>

                    <div class="mdl-tabs mdl-js-tabs mdl-js-ripple-effect">
                        <div class="mdl-tabs__tab-bar">
                            <a href="#point-panel" class="mdl-tabs__tab is-active"><span class="feature-type-icon point-icon"></span>点要素图层</a>
                            <a href="#line-panel" class="mdl-tabs__tab"><span class="feature-type-icon line-icon"></span>线要素图层</a>
                            <a href="#polygon-panel" class="mdl-tabs__tab"><span class="feature-type-icon polygon-icon"></span>面要素图层</a>
                        </div>

                        <!-- 点要素图层 -->
                        <div class="mdl-tabs__panel is-active" id="point-panel">
                            <div class="table-card">
                                <div class="table-header">
                                    <h4><span class="feature-type-icon point-icon"></span>点要素图层 (Point Feature Layer)</h4>
                                    <div class="table-description">存储建筑物、设施等点状要素信息</div>
                                    <div class="table-description">URL: https://services8.arcgis.com/CmXfu09loK81if9H/arcgis/rest/services/DeepseekDesignCityFeaturelayer/FeatureServer/0</div>
                                </div>
                                <div class="table-content">
                                    <div class="column-row">
                                        <div class="column-name">OBJECTID</div>
                                        <div class="column-type">esriFieldTypeOID</div>
                                        <div class="column-constraints"><span class="primary-key">主键</span>, 自动生成</div>
                                    </div>
                                    <div class="column-row">
                                        <div class="column-name">BuildingName</div>
                                        <div class="column-type">esriFieldTypeString</div>
                                        <div class="column-constraints">非空, 建筑物名称</div>
                                    </div>
                                    <div class="column-row">
                                        <div class="column-name">BuildingType</div>
                                        <div class="column-type">esriFieldTypeString</div>
                                        <div class="column-constraints">建筑物类型（如学校、医院、商场等）</div>
                                    </div>
                                    <div class="column-row">
                                        <div class="column-name">description</div>
                                        <div class="column-type">esriFieldTypeString</div>
                                        <div class="column-constraints">建筑物描述信息</div>
                                    </div>
                                    <div class="column-row">
                                        <div class="column-name">createdAtTime</div>
                                        <div class="column-type">esriFieldTypeDate</div>
                                        <div class="column-constraints">创建时间</div>
                                    </div>
                                    <div class="column-row">
                                        <div class="column-name">SHAPE</div>
                                        <div class="column-type">esriFieldTypeGeometry (Point)</div>
                                        <div class="column-constraints"><span class="geometry-field">几何字段</span>, 存储点的坐标信息</div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- 线要素图层 -->
                        <div class="mdl-tabs__panel" id="line-panel">
                            <div class="table-card">
                                <div class="table-header">
                                    <h4><span class="feature-type-icon line-icon"></span>线要素图层 (Line Feature Layer)</h4>
                                    <div class="table-description">存储道路、河流等线状要素信息</div>
                                    <div class="table-description">URL: https://services8.arcgis.com/CmXfu09loK81if9H/arcgis/rest/services/DeepseekDesignCityFeaturelayer/FeatureServer/1</div>
                                </div>
                                <div class="table-content">
                                    <div class="column-row">
                                        <div class="column-name">OBJECTID</div>
                                        <div class="column-type">esriFieldTypeOID</div>
                                        <div class="column-constraints"><span class="primary-key">主键</span>, 自动生成</div>
                                    </div>
                                    <div class="column-row">
                                        <div class="column-name">RoadName</div>
                                        <div class="column-type">esriFieldTypeString</div>
                                        <div class="column-constraints">非空, 道路名称</div>
                                    </div>
                                    <div class="column-row">
                                        <div class="column-name">RoadType</div>
                                        <div class="column-type">esriFieldTypeString</div>
                                        <div class="column-constraints">道路类型（如主干道、次干道、支路等）</div>
                                    </div>
                                    <div class="column-row">
                                        <div class="column-name">description</div>
                                        <div class="column-type">esriFieldTypeString</div>
                                        <div class="column-constraints">道路描述信息</div>
                                    </div>
                                    <div class="column-row">
                                        <div class="column-name">createdAtTime</div>
                                        <div class="column-type">esriFieldTypeDate</div>
                                        <div class="column-constraints">创建时间</div>
                                    </div>
                                    <div class="column-row">
                                        <div class="column-name">SHAPE</div>
                                        <div class="column-type">esriFieldTypeGeometry (Polyline)</div>
                                        <div class="column-constraints"><span class="geometry-field">几何字段</span>, 存储线的坐标信息</div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- 面要素图层 -->
                        <div class="mdl-tabs__panel" id="polygon-panel">
                            <div class="table-card">
                                <div class="table-header">
                                    <h4><span class="feature-type-icon polygon-icon"></span>面要素图层 (Polygon Feature Layer)</h4>
                                    <div class="table-description">存储区域、地块等面状要素信息</div>
                                    <div class="table-description">URL: https://services8.arcgis.com/CmXfu09loK81if9H/arcgis/rest/services/DeepseekDesignCityFeaturelayer/FeatureServer/2</div>
                                </div>
                                <div class="table-content">
                                    <div class="column-row">
                                        <div class="column-name">OBJECTID</div>
                                        <div class="column-type">esriFieldTypeOID</div>
                                        <div class="column-constraints"><span class="primary-key">主键</span>, 自动生成</div>
                                    </div>
                                    <div class="column-row">
                                        <div class="column-name">AreaName</div>
                                        <div class="column-type">esriFieldTypeString</div>
                                        <div class="column-constraints">非空, 区域名称</div>
                                    </div>
                                    <div class="column-row">
                                        <div class="column-name">ServiceType</div>
                                        <div class="column-type">esriFieldTypeString</div>
                                        <div class="column-constraints">服务类型（如商业区、居住区、工业区等）</div>
                                    </div>
                                    <div class="column-row">
                                        <div class="column-name">description</div>
                                        <div class="column-type">esriFieldTypeString</div>
                                        <div class="column-constraints">区域描述信息</div>
                                    </div>
                                    <div class="column-row">
                                        <div class="column-name">createdAtTime</div>
                                        <div class="column-type">esriFieldTypeDate</div>
                                        <div class="column-constraints">创建时间</div>
                                    </div>
                                    <div class="column-row">
                                        <div class="column-name">SHAPE</div>
                                        <div class="column-type">esriFieldTypeGeometry (Polygon)</div>
                                        <div class="column-constraints"><span class="geometry-field">几何字段</span>, 存储面的坐标信息</div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </section>

                <section id="geometry-info" class="schema-overview">
                    <h4>几何信息</h4>
                    <div class="schema-info">
                        <p><strong>空间参考系统:</strong> WGS 1984 Web Mercator (Auxiliary Sphere)</p>
                        <p><strong>WKID:</strong> 3857</p>
                        <p><strong>坐标单位:</strong> 米</p>
                        <p><strong>几何存储:</strong> 所有几何信息存储在SHAPE字段中，根据图层类型不同，分别为Point、Polyline和Polygon类型</p>
                    </div>
                </section>

                <section id="relationships" class="relationship-diagram">
                    <h4 class="relationship-title">空间关系</h4>

                    <div class="relationship-container">
                        <div class="relationship-item">
                            <strong>点要素图层</strong> <span class="relationship-arrow">⊂</span> <strong>线要素图层</strong>
                            <p>空间包含：点可以位于线上</p>
                        </div>

                        <div class="relationship-item">
                            <strong>线要素图层</strong> <span class="relationship-arrow">⊂</span> <strong>面要素图层</strong>
                            <p>空间包含：线可以位于面内或面边界上</p>
                        </div>

                        <div class="relationship-item">
                            <strong>点要素图层</strong> <span class="relationship-arrow">⊂</span> <strong>面要素图层</strong>
                            <p>空间包含：点可以位于面内</p>
                        </div>

                        <div class="relationship-item">
                            <strong>面要素图层</strong> <span class="relationship-arrow">∩</span> <strong>面要素图层</strong>
                            <p>空间相交：面与面可以相交</p>
                        </div>

                        <div class="relationship-item">
                            <strong>线要素图层</strong> <span class="relationship-arrow">∩</span> <strong>线要素图层</strong>
                            <p>空间相交：线与线可以相交</p>
                        </div>
                    </div>
                </section>

                <section id="operations" class="schema-overview">
                    <h4>支持的空间操作</h4>
                    <div class="schema-info">
                        <p><strong>查询操作:</strong> 属性查询、空间查询、缓冲区查询</p>
                        <p><strong>编辑操作:</strong> 添加要素、更新要素、删除要素</p>
                        <p><strong>分析操作:</strong> 缓冲区分析、热力图生成、统计分析</p>
                        <p><strong>可视化操作:</strong> 符号化渲染、标注、弹出窗口</p>
                    </div>
                </section>
            </div>
        </main>
    </div>
</body>
</html>
